package cn.project.demo.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ActionDemo {
	
	@RequestMapping("demo")
	public ModelAndView demo(HttpServletRequest request,HttpServletResponse response){
		
		ModelAndView mv = new ModelAndView("demo/demo");
		mv.addObject("demo","demo");
		return mv;
	}
	
	@RequestMapping
	public ModelAndView index(HttpServletRequest request,HttpServletResponse response){
		ModelAndView mv = new ModelAndView("index");
		mv.addObject("demo","demo");
		return mv;
	}

}
